package com.eaoa.vo.pub.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the pub_message table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="pub_message"
 */

public abstract class BasePubMessage  implements Serializable {

	public static String REF = "PubMessage";
	public static String PROP_SUBJECT = "subject";
	public static String PROP_MESSAGETYPE = "messagetype";
	public static String PROP_STATUS = "status";
	public static String PROP_SENDER = "sender";
	public static String PROP_SENDERNAME = "sendername";
	public static String PROP_RECEIVER = "receiver";
	public static String PROP_SENDERDATE = "senderdate";
	public static String PROP_ISLOCK = "islock";
	public static String PROP_SESSIONID = "sessionid";
	public static String PROP_CONTENT = "content";
	public static String PROP_RECEIVERNAME = "receivername";
	public static String PROP_RECEIVERS = "receivers";
	public static String PROP_MESSAGENO = "messageno";


	// constructors
	public BasePubMessage () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BasePubMessage (java.lang.Long messageno) {
		this.setMessageno(messageno);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Long messageno;

	// fields
	private java.lang.String subject;
	private java.lang.String content;
	private java.lang.Long sender;
	private java.lang.String sendername;
	private java.util.Date senderdate;
	private java.lang.Long receiver;
	private java.lang.String receivers;
	private java.lang.String receivername;
	private java.lang.String status;
	private java.lang.String islock;
	private java.lang.String messagetype;
	private java.lang.Long sessionid;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="increment"
     *  column="messageno"
     */
	public java.lang.Long getMessageno () {
		return messageno;
	}

	/**
	 * Set the unique identifier of this class
	 * @param messageno the new ID
	 */
	public void setMessageno (java.lang.Long messageno) {
		this.messageno = messageno;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: subject
	 */
	public java.lang.String getSubject () {
		return subject;
	}

	/**
	 * Set the value related to the column: subject
	 * @param subject the subject value
	 */
	public void setSubject (java.lang.String subject) {
		this.subject = subject;
	}



	/**
	 * Return the value associated with the column: content
	 */
	public java.lang.String getContent () {
		return content;
	}

	/**
	 * Set the value related to the column: content
	 * @param content the content value
	 */
	public void setContent (java.lang.String content) {
		this.content = content;
	}



	/**
	 * Return the value associated with the column: sender
	 */
	public java.lang.Long getSender () {
		return sender;
	}

	/**
	 * Set the value related to the column: sender
	 * @param sender the sender value
	 */
	public void setSender (java.lang.Long sender) {
		this.sender = sender;
	}



	/**
	 * Return the value associated with the column: sendername
	 */
	public java.lang.String getSendername () {
		return sendername;
	}

	/**
	 * Set the value related to the column: sendername
	 * @param sendername the sendername value
	 */
	public void setSendername (java.lang.String sendername) {
		this.sendername = sendername;
	}



	/**
	 * Return the value associated with the column: senderdate
	 */
	public java.util.Date getSenderdate () {
		return senderdate;
	}

	/**
	 * Set the value related to the column: senderdate
	 * @param senderdate the senderdate value
	 */
	public void setSenderdate (java.util.Date senderdate) {
		this.senderdate = senderdate;
	}



	/**
	 * Return the value associated with the column: receiver
	 */
	public java.lang.Long getReceiver () {
		return receiver;
	}

	/**
	 * Set the value related to the column: receiver
	 * @param receiver the receiver value
	 */
	public void setReceiver (java.lang.Long receiver) {
		this.receiver = receiver;
	}



	/**
	 * Return the value associated with the column: receivers
	 */
	public java.lang.String getReceivers () {
		return receivers;
	}

	/**
	 * Set the value related to the column: receivers
	 * @param receivers the receivers value
	 */
	public void setReceivers (java.lang.String receivers) {
		this.receivers = receivers;
	}



	/**
	 * Return the value associated with the column: receivername
	 */
	public java.lang.String getReceivername () {
		return receivername;
	}

	/**
	 * Set the value related to the column: receivername
	 * @param receivername the receivername value
	 */
	public void setReceivername (java.lang.String receivername) {
		this.receivername = receivername;
	}



	/**
	 * Return the value associated with the column: status
	 */
	public java.lang.String getStatus () {
		return status;
	}

	/**
	 * Set the value related to the column: status
	 * @param status the status value
	 */
	public void setStatus (java.lang.String status) {
		this.status = status;
	}



	/**
	 * Return the value associated with the column: islock
	 */
	public java.lang.String getIslock () {
		return islock;
	}

	/**
	 * Set the value related to the column: islock
	 * @param islock the islock value
	 */
	public void setIslock (java.lang.String islock) {
		this.islock = islock;
	}



	/**
	 * Return the value associated with the column: messagetype
	 */
	public java.lang.String getMessagetype () {
		return messagetype;
	}

	/**
	 * Set the value related to the column: messagetype
	 * @param messagetype the messagetype value
	 */
	public void setMessagetype (java.lang.String messagetype) {
		this.messagetype = messagetype;
	}



	/**
	 * Return the value associated with the column: sessionid
	 */
	public java.lang.Long getSessionid () {
		return sessionid;
	}

	/**
	 * Set the value related to the column: sessionid
	 * @param sessionid the sessionid value
	 */
	public void setSessionid (java.lang.Long sessionid) {
		this.sessionid = sessionid;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.eaoa.vo.pub.PubMessage)) return false;
		else {
			com.eaoa.vo.pub.PubMessage pubMessage = (com.eaoa.vo.pub.PubMessage) obj;
			if (null == this.getMessageno() || null == pubMessage.getMessageno()) return false;
			else return (this.getMessageno().equals(pubMessage.getMessageno()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getMessageno()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getMessageno().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}